const EntryPlugin = require('./plugins/EntryPlugin');

const applyEntryPlugin = (options, compiler) => {
    const { entry, context } = options;

    const opts = {
        chunkLoading: undefined,
        dependOn: undefined,
        filename: undefined,
        library: undefined,
        name: 'main',
        runtime: undefined,
        wasmLoading: undefined,
    }

    new EntryPlugin(context, entry, opts).apply(compiler);
};

const applyDefaultPlugins = (options, compiler) => {
    applyEntryPlugin(options, compiler);
};

module.exports = applyDefaultPlugins;
